﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CategoriesList.aspx.cs" Inherits="BookShop2.CategoriesList" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div style="width: 1019px; margin-right: 1318px">
            <asp:DataList ID="DataList1" runat="server" BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" DataSourceID="ObjectDataSource1" GridLines="Both" RepeatColumns="3" RepeatDirection="Horizontal" RepeatLayout="Flow" OnItemCommand="DataList1_ItemCommand">

                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" />
                <ItemStyle BackColor="White" ForeColor="#330099" />
                <HeaderTemplate><h1>图书类别列表</h1></HeaderTemplate>
                <ItemTemplate>
                    图书种类编号:
                    <asp:Label ID="CategoryIDLabel" runat="server" Text='<%# Eval("CategoryID") %>' />
                    
                    <br />
                    图书种类:
                    <a href="BookList.aspx?cateid=<%# Eval("CategoryID") %>&catename=<%# Eval("CategoryName") %>"><%# Eval("CategoryName") %></a>
                    <br />

                    <asp:Button ID="Button1" runat="server" CommandArgument='<%# Eval("CategoryID") %>' CommandName="Del" OnClientClick="return confirm('真的要删除吗？')" Text="删除" />
                   <a href="EditCategory.aspx?cateid=<%# Eval("CategoryID") %>") target="_blank">编辑</a>
                     <br /> <br />
                </ItemTemplate>
                <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            </asp:DataList>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="Getcategories" TypeName="BookShop.BLL.CategoriesBLL"></asp:ObjectDataSource>
            <br />
            <br />
            <br />
            <br />
            <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
            </asp:Repeater>
            <br />
        </div>
    </form>
</body>
</html>
